package org.cfx.org.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.junit.experimental.theories.suppliers.TestedOn;

import java.util.Date;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@ToString
@Data
@Slf4j
public class Department {
    private Long id;
    @Schema(description = "姓名")
    private String name;
    @Schema(description = "介绍")
    private String intro;
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date create_time;
    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date update_time;
    /** 部门的路径*/
    @Schema(description = "部门的路径")
    private String path;


    /** 部门经理对应员工表*/
    private Long manager_id;
    private Employee manager;
    /** 上级部门自关联*/
    private Long parent_id;
    private Department parentDepartment;
    /** 部门的状态 0禁用/1启用*/
    @Schema(description = "部门的状态 0禁用/1启用")
    private Long state;

    /*存放子集部门*/
    private List<Department> children;
}
